package jcommand.exception;

/**
 * This exception is thrown by the
 * {@link jcommand.CommandSet#addCommand(jcommand.Command)} to indicate that a
 * the <code>CommandSet</code> object already exist the
 * <code>commandKey</code>
 * 
 * @author Kenneth Lo
 * @since 1.0.0
 * 
 */
public class DuplicateCommandKeyException extends RuntimeException {

	/**
	 * DuplicateCommandKeyException Version UID
	 * 
	 * @since 1.0.0
	 * 
	 */
	public static final long serialVersionUID = 1;

	/**
	 * Constructs an DuplicateCommandKeyException with the specified command
	 * key.
	 * 
	 * @param commandKey
	 *            the duplicated command key
	 * @since 1.0.0
	 */
	public DuplicateCommandKeyException(String commandKey) {
		super("Duplicate Command Key. CommandKey: " + commandKey
				+ " already existed.");
	}
}
